

const TokenKey = 'token'
const DeviceInfoKey = 'deviceInfo'
const BasebandInfoKey = 'basebandInfo'
const BtnPermissionsKey = 'btnPermissions'
export function getToken() {
  return localStorage.getItem(TokenKey)
}

export function setToken(token: string) {
  return localStorage.setItem(TokenKey, token)
}

export function removeToken() {
  return localStorage.removeItem(TokenKey)
}

export function setDeviceInfo(deviceInfo: any) {
  return localStorage.setItem(DeviceInfoKey, JSON.stringify(deviceInfo))
}


export function getDeviceInfo() {
  return localStorage.getItem(DeviceInfoKey)
}


export function removeDeviceInfo() {
  return localStorage.removeItem(DeviceInfoKey)
}

export function setBasebandInfo(basebandInfo: any) {
  return localStorage.setItem(BasebandInfoKey, JSON.stringify(basebandInfo))
}

export function getBasebandInfo() {
  return JSON.parse(localStorage.getItem(BasebandInfoKey) || '{}')
}

export function removeBasebandInfo() {
  return localStorage.removeItem(BasebandInfoKey)
}


export function setBtnPermissions(btnPermissions: string[]) {
  return localStorage.setItem(BtnPermissionsKey, JSON.stringify(btnPermissions))
}

export function getBtnPermissions() {
  return JSON.parse(localStorage.getItem(BtnPermissionsKey) || '[]')
}

export function removeBtnPermissions() {
  return localStorage.removeItem(BtnPermissionsKey)
}



